{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">选手搜索</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form layui-form-pane" action="{:url('admin/ContestantReview/contestantReview')}" method="get">
                    <div class="layui-inline">
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="{$keyword}" placeholder="手机号/姓名" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn">搜索</button>
                    </div>
                </form>
                <hr>

                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>微信名</th>
                        <td>微信头像</td>
                        <th>姓名</th>
                        <th>手机号</th>
                        <th>参赛作品</th>
                        <th>报名时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="player_list" item="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.nickname}</td>
                        <td><img style="width: 25px;height: 25px"  id="imgs" src="{$vo.headimgurl}" onclick="doCancel(this)"  /></td>
                        <td>{$vo.playerName}</td>
                        <td>{$vo.playerMobile}</td>
                        <td>
                            {php}
                                $imgs = explode(",",$vo['playerPic']);
                                  for($i = 0; $i < count($imgs); $i++){
                            {/php}
                            <img style="width: 25px;height: 25px"  id="imgss" src="http://sml.lfmall.net{$imgs[$i]}" onclick="doCancels(this)"/>
                            {php}
                                 }
                            {/php}
                        </td>
                        <td>{$vo.createTime}</td>
                        <td>
                            <a href="{:url('admin/ContestantReview/toExamine',['id'=>$vo['id'],'status'=>1])}" class="layui-btn layui-btn-normal layui-btn-mini ajax-update">通过</a>
                            <a href="{:url('admin/ContestantReview/toExamine',['id'=>$vo['id'],'status'=>0])}" class="layui-btn layui-btn-normal layui-btn-mini ajax-update" style="background: ">拒绝</a>
                            <a href="{:url('admin/ContestantReview/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
                {$player_list->render()}
            </div>
        </div>
    </div>
    <div id="imgManager" style="margin: auto;width: 200px;height: 200px;display: none;position:fixed;top:25%;left:50%;">
        <img  id="ims" style="width: 200px;height: 200px;" src="xxx" onclick="goCancel(this)"/>
    </div>
</div>
<script type="text/javascript" src="JS/jquery-1.5.1.min.js"></script>
<script type="text/javascript">
    function doCancel(obj){
        $("#imgManager").css("display","block");
        $("#ims").attr({
            "src": obj.src
        })
    }

    function doCancels(obj){
        $("#imgManager").css("display","block");
        $("#ims").attr({
            "src": obj.src
        })
    }

    function goCancel(){
        $("#imgManager").css("display","none");
    }
</script>
{/block}